package main

import "fmt"

type CQueue struct {
	inStack ,outStack []int
}

func Constructor() CQueue{
	return CQueue{}
}

func (this *CQueue) AppendTail(value int){
	this.inStack =append(this.inStack,value)
}

func (this *CQueue) DeleteHead() int {
	if  len(this.outStack) == 0{
		if len(this.inStack) == 0{
			return -1
		}
		//如果outStack没有元素的时候，就先把inStack所有元素放入outStack
		this.in2out()
	}
	value :=this.outStack[len(this.outStack)-1]
	this.outStack =this.outStack[:len(this.outStack)-1]
	return value
}

func (this *CQueue) in2out(){
	//将inStack的元素放入outStack队列中
	for len(this.inStack) >0{
		this.outStack =append(this.outStack,this.inStack[len(this.inStack)-1])
	    this.inStack =this.inStack[:len(this.inStack)-1]
	}
}

func x (s string)[]string{
	x :=make([]string,0)
	for _,v:=range s {
		x=append(x,string(v))
	}
	return x
}

func  main(){
	s :="asdasf"
	fmt.Println(x(s))
}